package homework21.studyplan.user;

import java.util.Date;
import java.util.Scanner;

public class Test01 {

    public static boolean birthDay (String birthDay){
        Scanner input = new Scanner(System.in);
        String[]pintword = new String[6];

        pintword = birthDay.split("/");
        if(pintword.length == 1){
            System.out.println("输入错误！");
            return false;
        }else{
            return true;
        }
    }

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        boolean isTrue = false;
        String password = null;
        String birthDay = null;
        do{
            System.out.print("请输入会员生日<月/日:00/00>:");
            birthDay = input.next();
             isTrue = birthDay (birthDay);
        } while(!isTrue);
        do{
            System.out.print("请输入会员密码(6到10位密码):");
             password = input.next();
        }while(password.length() < 6 || password.length() > 10);

       User user = new User(birthDay,password);

        System.out.println(user.toString());
    }
}
